package app.myteamapplication;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

public class MenuEntradas extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_menu_entradas);

        Button cont1 = (Button) findViewById(R.id.buttonEntrada1);
        cont1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                LinearLayout row = (LinearLayout) findViewById(R.id.lyCarrito);

                int j = 0;
                Button btnTag = new Button(v.getContext());
                btnTag.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                btnTag.setText("Entrada 1");
                btnTag.setId(j + 1);
                row.addView(btnTag);
            }
        });

        Button cont2 = (Button) findViewById(R.id.buttonEntrada2);
        cont2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                LinearLayout row = (LinearLayout) findViewById(R.id.lyCarrito);

                int j = 0;
                Button btnTag = new Button(v.getContext());
                btnTag.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                btnTag.setText("Entrada 2");
                btnTag.setId(j + 1);
                row.addView(btnTag);
            }
        });
        Button cont3 = (Button) findViewById(R.id.buttonEntrada3);
        cont3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                LinearLayout row = (LinearLayout) findViewById(R.id.lyCarrito);

                int j = 0;
                Button btnTag = new Button(v.getContext());
                btnTag.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                btnTag.setText("Entrada 3");
                btnTag.setId(j + 1);
                row.addView(btnTag);
            }
        });
        Button cont4 = (Button) findViewById(R.id.buttonEntrada4);
        cont4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                LinearLayout row = (LinearLayout) findViewById(R.id.lyCarrito);

                int j = 0;
                Button btnTag = new Button(v.getContext());
                btnTag.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                btnTag.setText("Entrada 4");
                btnTag.setId(j + 1);
                row.addView(btnTag);
            }
        });
        Button cont5 = (Button) findViewById(R.id.buttonEntrada5);
        cont5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                LinearLayout row = (LinearLayout) findViewById(R.id.lyCarrito);

                int j = 0;
                Button btnTag = new Button(v.getContext());
                btnTag.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                btnTag.setText("Entrada 5");
                btnTag.setId(j + 1);
                row.addView(btnTag);
            }
        });

    }
}
